package com.aistar.service.impl;

import com.aistar.mapper.TracommMapper;
import com.aistar.pojo.Tracomm;
import com.aistar.pojo.TracommExample;
import com.aistar.service.TracommService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class TracommServiceImpl implements TracommService {
    @Autowired
    private TracommMapper tracommMapper;





    @Override
    public List<Tracomm> getbyTravelId(int id) {
        //增加通过游记id查询的条件

        TracommExample example = new TracommExample();
        TracommExample.Criteria criteria = example.createCriteria();
        criteria.andTracTableIdEqualTo(id);

        List<Tracomm> tracommList = tracommMapper.selectByExampleWithBLOBs(example);
        for (Tracomm tra:tracommList)
            System.out.println("13213" + tra.getTracOther1());

        return tracommList;
    }
}
